package com.an.springresource;

import java.io.IOException;

import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;

public class PatternResolverMain {

  public static void main(String[] args) throws IOException {
    ResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver();
    // 加载所有以。xml为后缀的文件
    Resource[] resources  = patternResolver.getResources("classpath*:com/**/*.xml");
    for(Resource resource : resources) {
      System.out.println(resource.getDescription());
    }
    
  }
}

